<template>
	<view>

		<!-- 		<view class="container" style="font-size: 28px;">

			<uni-nav-bar shadow left-icon="left" @clickLeft="back" leftText="返回" rightText="" title="住院信息"
				@clickRight="right()" />

		</view> -->

		<view class="flex-col zhuyuanrenxinxi">
			<view style="width: 100%; height: 20px;"></view>
			<!-- <u-navbar class="navbar" back-icon-name="arrow-left" back-text="返回" title="任性布局"></u-navbar> -->
			<view class="flex-col d1">
				<view class="flex-row wraper-row" style="margin: -5px 0px 15px 10px;">
					<view class="u-line-1 text">住院信息</view>
					<view class="u-line-1 text-two" v-if="!!hospital.campus"> {{hospital.campus.campusName}}</view>
				</view>
				<u-line class="line" color="#f4f4f4" margin="0rpx 0rpx 28rpx 0rpx"></u-line>
				<view class="flex-row wraper-row-two" style="margin: -5px 0px 15px 10px;">
					<view class="u-line-1 text-three">住院科室</view>
					<view class="u-line-1 text-four"> {{hospital.divisionType.divisionName}}</view>
				</view>
				<u-line class="line" color="#f4f4f4" margin="0rpx 0rpx 20rpx 0rpx"></u-line>
				<view class="flex-row wraper-row-three" style="margin: -5px 0px 15px 10px;">
					<view class="u-line-1 text-five">入院时间</view>
					<view class="u-line-1 text-six">{{hospital.hospitalizedTime}}</view>
				</view>
				<u-line class="line" color="#f4f4f4" margin="0rpx 0rpx 20rpx 0rpx"></u-line>
				<view class="flex-row wraper-row-four" style="margin: -5px 0px 15px 10px;">
					<view class="u-line-1 text-seven">出院时间</view>
					<view class="u-line-1 text-eight">{{hospital.leavehospitalTime}}</view>
				</view>
				<u-line class="line" color="#f4f4f4" margin="0rpx 0rpx 28rpx 0rpx"></u-line>
				<view class="flex-row wraper-row-five" style="margin: -5px 0px 5px 10px;">
					<view class="u-line-1 text-nine">住院状态</view>
					<view class="u-line-1 text-ten">{{hospital.status}}</view>
				</view>
			</view>
			<view class="flex-col d1-two">
				<view class="u-line-1 text-eleven">就诊人</view>
				<view class="u-line-1 text-twelve">{{hospital.thePatient.name}}</view>
				<u-line class="line" color="#f4f4f4" margin="0rpx 0rpx 28rpx 0rpx"></u-line>
				<view class="u-line-1 text-thirteen">证件类型</view>
				<view class="u-line-1 text-fourteen">{{hospital.thePatient.documentType}}</view>
				<u-line class="line" color="#f4f4f4" margin="0rpx 0rpx 20rpx 0rpx"></u-line>
				<view class="u-line-1 text-fifteen">身份证号</view>
				<view class="u-line-1 text-sixteen">{{hospital.thePatient.number}}</view>
				<u-line class="line" color="#f4f4f4" margin="0rpx 0rpx 20rpx 0rpx"></u-line>
				<view class="u-line-1 text-seventeen">手机号码</view>
				<view class="u-line-1 text-eighteen">{{hospital.thePatient.phone}}</view>
				<u-line class="line" color="#f4f4f4" margin="0rpx 0rpx 28rpx 0rpx"></u-line>
				<view class="u-line-1 text-nineteen">就诊卡号</view>
				<view class="u-line-1 text-twenty"> {{hospital.thePatient.hospitalNumber}}</view>
				<u-line class="line" color="#f4f4f4" margin="0rpx 0rpx 24rpx 0rpx"></u-line>
				<view class="flex-row wraper-row-six">
					<view class="u-line-1 text-20">住院号</view>
					<view class="u-line-1 text-21">{{hospital.admissionNumber}}</view>
				</view>
			</view>
			<u-button class="button" shape="circle" @click="onClick()" >
				住院充值
			</u-button>
		</view>

	</view>

</template>

<script>
	export default {
		data() {
			return {
				hospital: {
					
				}
			}
		},

		onLoad(id) {
			this.id = id.id
			uni.request({
				url: "http://localhost:9000/user/user/inpatient/hospitalById/" + this.id,
				method: "GET",
				success: (res) => {
					console.log(res)
					if (res.data.code == 20000) {
						this.hospital = res.data.data.hospital
						if (this.hospital.campus != null) {
							this.isopen = true
							this.isPay = true
							this.confirm = false
						}
						// console.log(this.hospital)
					}
				}
			})
			// console.log(this.id)
		},
		methods: {
			onClick() {
				
				var e ={
					patientId:this.hospital.patientId,//就诊人id
					hospitalNumber:this.hospital.thePatient.hospitalNumber,//就诊卡号
					name:this.hospital.thePatient.name,//就诊人姓名2
				}
				// console.log("e::::::"+e.patientId)
				// console.log("e::::::"+e.hospitalNumber)
				uni.navigateTo({
					url: "./zhuyuanchognzhi?eVo=" + encodeURIComponent(JSON.stringify(e)),
					
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	/** 全局样式-开始,建议放在公共css样式文件中,比如common.css 或app.vue文件 */

	html,
	body {
		margin: 0;
		width: 100%;
		height: 100%;
		font-size: 16px
	}

	view,
	text,
	image {
		position: relative;
		box-sizing: border-box;
		flex-shrink: 0;
	}

	.flex-col {
		display: flex;
		align-items: flex-start;
		flex-direction: column;
	}

	.flex-row {
		display: flex;
		align-items: flex-start;
	}

	.flex-col .flex-row {
		width: 100%
	}

	/** 全局样式-结束*/

	.zhuyuanrenxinxi {
		height: 896px;
		width: 414px;

		.navbar {
			width: 100%;
			margin-bottom: 13px;
			flex: 0;
		}

		.d1 {
			width: 350px;
			margin-right: auto;
			margin-bottom: 20px;
			margin-left: auto;
			padding: 23px 0px 28px 8px;
			border-width: 1px;
			border-style: solid;
			border-color: rgba(248, 248, 248, 1);
			border-top-width: 1px;
			background: rgba(255, 255, 255, 1);
			color: 0px;

			.wraper-row {
				width: 210px;
				justify-content: space-between;
				margin: 0px 0px 7px 11px;

				.text {
					width: 89px;
					font-size: 16px;
					color: rgba(213, 190, 178, 1);
				}

				.text-two {
					width: 199px;
					font-size: 16px;
					color: rgba(104, 69, 55, 1);
				}
			}

			.line {
				width: 293px;
				border-width: 2px;
				border-style: solid;
				border-top-width: 7px;
			}

			.wraper-row-two {
				width: 263px;
				justify-content: space-between;
				margin: 0px 0px 11px 11px;

				.text-three {
					width: 78px;
					font-size: 16px;
					color: rgba(213, 190, 178, 1);
				}

				.text-four {
					width: 152px;
					font-size: 16px;
					color: rgba(104, 69, 55, 1);
				}
			}

			.wraper-row-three {
				width: 279px;
				justify-content: space-between;
				margin-right: auto;
				margin-bottom: 11px;
				margin-left: auto;

				.text-five {
					width: 78px;
					font-size: 16px;
					color: rgba(213, 190, 178, 1);
				}

				.text-six {
					width: 168px;
					font-size: 16px;
					color: rgba(104, 69, 55, 1);
				}
			}

			.wraper-row-four {
				width: 279px;
				justify-content: space-between;
				margin-right: auto;
				margin-bottom: 7px;
				margin-left: auto;

				.text-seven {
					width: 78px;
					font-size: 16px;
					color: rgba(213, 190, 178, 1);
				}

				.text-eight {
					width: 168px;
					font-size: 16px;
					color: rgba(104, 69, 55, 1);
				}
			}

			.wraper-row-five {
				width: 279px;
				justify-content: space-between;
				margin-right: auto;
				margin-left: auto;

				.text-nine {
					width: 78px;
					font-size: 16px;
					color: rgba(213, 190, 178, 1);
				}

				.text-ten {
					width: 168px;
					font-size: 16px;
					color: rgba(104, 69, 55, 1);
				}
			}
		}

		.d1-two {
			width: 350px;
			margin-right: auto;
			margin-bottom: 22px;
			margin-left: auto;
			padding: 23px 0px 17.5px 8px;
			border-width: 1px;
			border-style: solid;
			border-color: rgba(248, 248, 248, 1);
			border-top-width: 1px;
			background: rgba(255, 255, 255, 1);
			color: 0px;

			.text-eleven {
				width: 89px;
				margin: 0px 0px -20px 11px;
				font-size: 16px;
				color: rgba(213, 190, 178, 1);
			}

			.text-twelve {
				width: 99px;
				margin: 0px 0px 7px 122px;
				font-size: 16px;
				color: rgba(104, 69, 55, 1);
			}

			.line {
				width: 293px;
				border-width: 2px;
				border-style: solid;
				border-top-width: 7px;
			}

			.text-thirteen {
				width: 78px;
				margin: 0px 0px -20px 11px;
				font-size: 16px;
				color: rgba(213, 190, 178, 1);
			}

			.text-fourteen {
				width: 152px;
				margin: 0px 0px 11px 122px;
				font-size: 16px;
				color: rgba(104, 69, 55, 1);
			}

			.text-fifteen {
				width: 78px;
				margin: 0px 0px -20px 11px;
				font-size: 16px;
				color: rgba(213, 190, 178, 1);
			}

			.text-sixteen {
				width: 168px;
				margin: 0px 0px 11px 122px;
				font-size: 16px;
				color: rgba(104, 69, 55, 1);
			}

			.text-seventeen {
				width: 78px;
				margin: 0px 0px -20px 11px;
				font-size: 16px;
				color: rgba(213, 190, 178, 1);
			}

			.text-eighteen {
				width: 168px;
				margin: 0px 0px 7px 122px;
				font-size: 16px;
				color: rgba(104, 69, 55, 1);
			}

			.text-nineteen {
				width: 78px;
				margin: 0px 0px -20px 11px;
				font-size: 16px;
				color: rgba(213, 190, 178, 1);
			}

			.text-twenty {
				width: 168px;
				margin: 0px 0px 9px 122px;
				font-size: 16px;
				color: rgba(104, 69, 55, 1);
			}

			.wraper-row-six {
				width: 279px;
				justify-content: space-between;
				margin-right: auto;
				margin-left: auto;

				.text-20 {
					width: 78px;
					font-size: 16px;
					color: rgba(213, 190, 178, 1);
				}

				.text-21 {
					width: 168px;
					font-size: 16px;
					color: rgba(104, 69, 55, 1);
				}
			}
		}

		.button {
			width: 303px;
			margin-left: 53px;
			background: rgba(0, 110, 255, 1);
			color: rgba(255, 255, 255, 1);
		}
	}
</style>
